function Show(id){
    document.getElementById("divTreeview_" + id).style.display="";
    if(document.getElementById("frmTreeview_" + id)!=null){
        document.getElementById("frmTreeview_" + id).style.display="";
    }
}

function Hide(id){
    document.getElementById("divTreeview_" + id).style.display="none";
    if(document.getElementById("frmTreeview_" + id)!=null){
        document.getElementById("frmTreeview_" + id).style.display="none";
    }
}

function GetTreeValue(textid,textstr,valueid,valuestr){
    document.getElementById(textid).value = textstr;
    if(valueid!=""){
        document.getElementById(valueid).value = valuestr;
    }
}

function GetSelect(id,vid,controlid){
    var getid = document.getElementById(controlid);
    var checkBoxs = getid.getElementsByTagName('input');
    var checkstr="";
    var checkvalue="";
    for(var i=0;i<checkBoxs.length;i++){
        if(checkBoxs[i].type=='checkbox' && checkBoxs[i].checked){
            checkstr = checkstr + checkBoxs[i].title + ",";
            checkvalue = checkvalue + checkBoxs[i].value + ",";
        }
    }
    document.getElementById(id).value = checkstr.substring(0,checkstr.length-1);
    if(vid!=""){
        document.getElementById(vid).value = checkvalue.substring(0,checkvalue.length-1);
    }
}
